package com.kuang.pojo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
//注解@Component
//等价于 <bean id="user" class="com.kuang.pojo.User"/>
//
//@Value 用于简单注入值，也已注解在set方法上
//等价于<property name="name" value="tyl"></property>

@Component
public class User {
    @Value("tyl")
    public String name;
}
